<template>
	<view class="mettingdetail">
		<view class="mettingdetailBox">
			<view class="mettingdetaiTop">
				<image src="../../static/image/iconfool.png" style="width: 48rpx;height: 48rpx;" mode=""></image>
				<view class="" style="margin-left: 20rpx;">
					会议纪要
				</view>
			</view>
			<view class="detailItem">
				<view class="lable">
					会议时间
				</view>
				<view class="value">
					{{pageData.strart_time}}
				</view>
			</view>
			<view class="detailItem">
				<view class="lable">
					会议参加人
				</view>
				<view class="value">
					<!-- {{pageData.meeting_plays == null ?'' : pageData.meeting_plays}} -->
					<view class="" v-for="(subitem,subindex) in pageData.member">
						{{subitem.name}}
					</view>
					<view class="" v-for="(subitem,subindex) in pageData.parent">
						{{subitem.name}}
					</view>
					<view class="" v-for="(subitem,subindex) in pageData.consultant">
						{{subitem.name}}
					</view>
				</view>
			</view>
			<!-- <view class="detailItem">
				<view class="lable">
					会议时间
				</view>
				<view class="value">
					2023-09-08
				</view>
			</view> -->

		</view>
		<view class="title">
			<view>
				会议记录
			</view>
			<view class="copy" @click="handleCopy(pageData.content)">
				复制
			</view>
		</view>
		<view class="contentBox">
			<!-- <rich-text type="text" :nodes="pageData.content"></rich-text> -->
			<u-parse :content="pageData.content"></u-parse>
		</view>

	</view>
</template>

<script>
	import {
		meetingDetails
	} from "@/api/api.js"
	var graceRichText = require("../../static/richText.js");
	export default {
		data() {
			return {
				pageId: "",
				pageData: {},
				content:"",
			}
		},
		onLoad(options) {
			this.pageId = options.id
			this.handleDetail()
		},
		methods: {
			async handleDetail() {
				let res = await meetingDetails({
					id: this.pageId
				})
				this.pageData = res.data
				this.content = this.pageData.content
				this.pageData.content = graceRichText.format(this.pageData.content)
			},
			//复制
			handleCopy(value) {
				console.log("value", value.replace(/<[^<>]+>/g, '').replace(/&nbsp;/ig, ''))
				let copyStr = value.replace(/<[^<>]+>/g, '').replace(/&nbsp;/ig, '')
				uni.setClipboardData({
					data: copyStr, //要被复制的内容
					success: () => {
						uni.showToast({
							title: '复制成功',
							icon: "none",
							duration: 1800
						});
					}
				});
			},
		}
	}
</script>

<style scoped lang="scss">
	.mettingdetail {
		padding: 30rpx;
		box-sizing: border-box;

		.mettingdetailBox {
			width: 690rpx;
			// height: 390rpx;
			background: #FFFFFF;
			border-radius: 16rpx 16rpx 16rpx 16rpx;


			.mettingdetaiTop {
				width: 690rpx;
				height: 92rpx;
				background: linear-gradient(180deg, #E1E8FD 0%, #FEFEFF 100%);
				border-radius: 16rpx 16rpx 16rpx 16rpx;
				padding: 20rpx 30rpx;
				box-sizing: border-box;
				display: flex;
				align-items: center;
				font-size: 32rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				color: #255A9B;
				line-height: 32rpx;
			}

			.detailItem {
				display: flex;
				width: 100%;
				justify-content: space-between;
				align-items: center;
				// height: 92rpx;
				padding: 20rpx 30rpx;
				box-sizing: border-box;

				.lable {
					font-size: 28rpx;
					font-family: PingFang SC, PingFang SC;
					font-weight: 400;
					color: #232832;
					line-height: 92rpx;
				}

				.value {
					font-size: 28rpx;
					font-family: PingFang SC, PingFang SC;
					font-weight: 400;
					color: #9E9E9E;
					line-height: 36rpx;
				}
			}
		}

		.title {
			width: 100%;
			padding: 0 30rpx;
			box-sizing: border-box;
			font-size: 30rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: 600;
			color: #212121;
			line-height: 30rpx;
			margin-top: 30rpx;
			display: flex;
			justify-content: space-between;
			margin-bottom: 10rpx;

			.copy {
				width: 64rpx;
				height: 34rpx;
				border: 1rpx solid #BBBBBB;
				font-size: 24rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				color: #BBBBBB;
				line-height: 34rpx;
				text-align: center;
				border-radius: 8rpx;
			}
		}

		.contentBox {
			width: 690rpx;
			background: #FFFFFF;
			border-radius: 16rpx 16rpx 16rpx 16rpx;
			padding: 30rpx;
			box-sizing: border-box;
			margin-top: 30rpx;
		}

	}
</style>